Skip to content

[SPARK-8023] [SQL] Add a deterministic method to Expression. #6570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

[SPARK-8023] [SQL] Add a deterministic method to Expression. #6570

wants to merge 3 commits into from

Conversation

yhuai
Copy link
Contributor

@yhuai yhuai commented Jun 2, 2015

@yhuai
Copy link
Contributor Author

yhuai commented Jun 2, 2015

@marmbrus @rxin @liancheng


/** Returns true if any expression in projectList is non-deterministic. */
private def hasNondeterministic(projectList: Seq[NamedExpression]): Boolean = {
projectList.exists(expr => expr.find(!_.deterministic).isDefined)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't match on rand() + 1 will this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will match rand() + 1. find will traverse the expression tree in pre-order.

rxin added a commit to rxin/spark that referenced this pull request Jun 2, 2015
[SPARK-8023] [SQL] Add a deterministic method to Expression.
@yhuai yhuai closed this Jun 2, 2015
@SparkQA
Copy link

SparkQA commented Jun 2, 2015

Test build #33953 has finished for PR 6570 at commit e38f264.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 2, 2015

Test build #33955 has finished for PR 6570 at commit da56200.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Jun 2, 2015
…d collapsing nondeterministic projects.

This closes #6570.

Author: Yin Huai <[email protected]>
Author: Reynold Xin <[email protected]>

Closes #6573 from rxin/deterministic and squashes the following commits:

356cd22 [Reynold Xin] Added unit test for the optimizer.
da3fde1 [Reynold Xin] Merge pull request #6570 from yhuai/SPARK-8023
da56200 [Yin Huai] Comments.
e38f264 [Yin Huai] Comment.
f9d6a73 [Yin Huai] Add a deterministic method to Expression.

(cherry picked from commit 0f80990)
Signed-off-by: Reynold Xin <[email protected]>

Conflicts:
	sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/random.scala
asfgit pushed a commit that referenced this pull request Jun 2, 2015
…d collapsing nondeterministic projects.

This closes #6570.

Author: Yin Huai <[email protected]>
Author: Reynold Xin <[email protected]>

Closes #6573 from rxin/deterministic and squashes the following commits:

356cd22 [Reynold Xin] Added unit test for the optimizer.
da3fde1 [Reynold Xin] Merge pull request #6570 from yhuai/SPARK-8023
da56200 [Yin Huai] Comments.
e38f264 [Yin Huai] Comment.
f9d6a73 [Yin Huai] Add a deterministic method to Expression.
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
…d collapsing nondeterministic projects.

This closes apache#6570.

Author: Yin Huai <[email protected]>
Author: Reynold Xin <[email protected]>

Closes apache#6573 from rxin/deterministic and squashes the following commits:

356cd22 [Reynold Xin] Added unit test for the optimizer.
da3fde1 [Reynold Xin] Merge pull request apache#6570 from yhuai/SPARK-8023
da56200 [Yin Huai] Comments.
e38f264 [Yin Huai] Comment.
f9d6a73 [Yin Huai] Add a deterministic method to Expression.
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
…d collapsing nondeterministic projects.

This closes apache#6570.

Author: Yin Huai <[email protected]>
Author: Reynold Xin <[email protected]>

Closes apache#6573 from rxin/deterministic and squashes the following commits:

356cd22 [Reynold Xin] Added unit test for the optimizer.
da3fde1 [Reynold Xin] Merge pull request apache#6570 from yhuai/SPARK-8023
da56200 [Yin Huai] Comments.
e38f264 [Yin Huai] Comment.
f9d6a73 [Yin Huai] Add a deterministic method to Expression.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants